package com.prs.crm.dao.crm.impl;

import java.sql.SQLException;
import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.Hibernate;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.criterion.Projection;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
import org.springframework.orm.hibernate3.HibernateCallback;

import com.prs.crm.dao.crm.DispatchVitalDao;
import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.domain.crm.DispatchVital;

public class DispatchVitalDaoImpl extends BaseDaoImpl<DispatchVital> implements DispatchVitalDao{

	@SuppressWarnings({ "unchecked", "rawtypes" })
	@Override
	public List<DispatchVital> getDispatchVital() {
		// TODO Auto-generated method stub
		return (List<DispatchVital>)this.getHibernateTemplate().execute(
				new HibernateCallback(){
					@Override
					public Object doInHibernate(Session arg0)
							throws HibernateException, SQLException {
						Criteria criteria=arg0.createCriteria(DispatchVital.class);
						return criteria.list();
					}
					
				}
			);
	}

}
